SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 55236: Leading blanks are removed when using PROC PRINT in all ODS destinations except Listing

DetailsAboutRate It

Leading blanks are removed from data values when you use the PRINT procedure to send output to ODS destinations other than the Listing destination. This can occur even when the ASIS=ON style attribute has been applied. The column headings display the leading blanks correctly when the ASIS=ON style attribute has been applied.

The example code below illustrates the problem:

ods listing;
data one;
   x="       String has embedded spaces";
   output;
   x="String has no embedded spaces";
   output;
run;
ods html file="c:\temp.html";
proc print data= one;
   var x / style(data)={asis=on};
run;
ods html close;

To circumvent the problem, use a procedure other than PROC PRINT, such as PROC REPORT, to maintain the leading blanks.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASMicrosoft® Windows® for x649.4 TS1M09.4 TS1M3
Microsoft Windows 8 Enterprise x649.4 TS1M09.4 TS1M3
Microsoft Windows 8 Pro x649.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Enterprise 32-bit9.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Enterprise x649.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Pro 32-bit9.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Pro x649.4 TS1M09.4 TS1M3
Microsoft Windows 109.4 TS1M09.4 TS1M3
Microsoft Windows Server 2008 R29.4 TS1M09.4 TS1M3
Microsoft Windows Server 2008 for x649.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 Datacenter9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 R2 Std9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 Std9.4 TS1M09.4 TS1M3
Windows 7 Enterprise x649.4 TS1M09.4 TS1M3
Windows 7 Professional x649.4 TS1M09.4 TS1M3
64-bit Enabled AIX9.4 TS1M09.4 TS1M3
64-bit Enabled Solaris9.4 TS1M09.4 TS1M3
HP-UX IPF9.4 TS1M09.4 TS1M3
Linux for x649.4 TS1M09.4 TS1M3
Solaris for x649.4 TS1M09.4 TS1M3
z/OS 64-bit9.4 TS1M09.4 TS1M3
z/OS9.4 TS1M09.4 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.